home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / include / net / af.h < prev    next >
C/C++ Source or Header  |  1988-10-23  |  1KB  |  47 lines

  1. /*
  2.  * Copyright (c) 1980, 1986 Regents of the University of California.
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms are permitted
  6.  * provided that this notice is preserved and that due credit is given
  7.  * to the University of California at Berkeley. The name of the University
  8.  * may not be used to endorse or promote products derived from this
  9.  * software without specific prior written permission. This software
  10.  * is provided ``as is'' without express or implied warranty.
  11.  *
  12.  *    @(#)af.h    7.2 (Berkeley) 12/30/87
  13.  */
  14.  
  15. #ifndef _AF
  16. #define _AF
  17.  
  18. /*
  19.  * Address family routines,
  20.  * used in handling generic sockaddr structures.
  21.  *
  22.  * Hash routine is called
  23.  *    af_hash(addr, h);
  24.  *    struct sockaddr *addr; struct afhash *h;
  25.  * producing an afhash structure for addr.
  26.  *
  27.  * Netmatch routine is called
  28.  *    af_netmatch(addr1, addr2);
  29.  * where addr1 and addr2 are sockaddr *.  Returns 1 if network
  30.  * values match, 0 otherwise.
  31.  */
  32. struct afswitch {
  33.     int    (*af_hash)();
  34.     int    (*af_netmatch)();
  35. };
  36.  
  37. struct afhash {
  38.     u_int    afh_hosthash;
  39.     u_int    afh_nethash;
  40. };
  41.  
  42. #ifdef KERNEL
  43. struct    afswitch afswitch[];
  44. #endif
  45.  
  46. #endif /* _AF */
  47.